<template>

    <view>
        <view>
            子组件传递过来的路径：{{src}}
        </view>
        <img-border @srcChange="handleChange" :src="src1"></img-border>
        <img-border @srcChange="handleChange" :src="src2"></img-border>
        <img-border @srcChange="handleChange" :src="src3"></img-border>
    </view>


<!--    <my-img></my-img>-->
</template>

<script>
import imgBorder from "@/components/img-border"
import ImgBorder from "../../components/img-border";
export default {
    name: "index",
    data() {
        return {
            src: "",
            src1: "../static/img/1547196286170.jpg",
            src2: "../static/img/1551515249839.jpg",
            src3: "../static/img/ChMkJ1beRX2ICgGAABiFx8Je3TgAAM6CQAMLAQAGIXf437_edited.jpg"
        }
    },
    components: {
        ImgBorder,
        myImg: imgBorder
    },
    methods: {
        handleChange(e) {
            console.log("父组件的定义被触发了！");
            this.src = e
        }
    },
    onLoad() {
        console.log(this.baseURL);
        // 获取globaldata数据
        console.log(getApp().globalData.base)
    }

}
</script>

<style scoped>

</style>
